const Supplies = () => import(/* webpackChunkName: "Sales" */ "@/views/trade/supply/list")
const Supply = () => import(/* webpackChunkName: "Sales" */ "@/views/trade/supply/detail")
const SuppliesBoardInfo = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/info")
const SuppliesBoardSeason = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/season")
const SuppliesBoardFishes = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/fishes")
const SuppliesBoardAddress = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/address")
const SuppliesBoardProvinces = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/addresses/provinces")
const SuppliesBoardCitys = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/addresses/citys")
const SuppliesBoardAreas = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/addresses/areas")
const SuppliesBoardTowns = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/addresses/towns")
const SuppliesBoardNomore = () => import(/* webpackChunkName: "SuppliesBoard" */ "@/views/trade/supply/post/addresses/nomore")

export default [
  {
    path: "/trade/supplies", //供应列表
    name: "supplies",
    component: Supplies
  },
  {
    path: "/trade/supply/:id", //供应详情
    name: "supplyDetail",
    component: Supply
  },
  {
    path: "/trade/supplies/post/fishes", //供应发布
    name: "suppliesBoardFishes",
    component: SuppliesBoardFishes,
    meta: { requiresAuth: 'toLoginPage' },
  },
  {
    path: "/trade/supplies/post/info",
    name: "suppliesBoardInfo",
    component: SuppliesBoardInfo,
    meta: { requiresAuth: true, requiresFish: true }
  },
  {
    path: "/trade/supplies/post/season",
    name: "suppliesBoardSeason",
    component: SuppliesBoardSeason,
    meta: { requiresAuth: true }
  },
  {
    path: "/trade/supplies/post/address",
    name: "suppliesBoardAddress",
    component: SuppliesBoardAddress,
    meta: { requiresAuth: true, requiresFish: true },
    children: [
      {
        path: "provinces",
        name: "suppliesBoardProvinces",
        component: SuppliesBoardProvinces,
        meta: { requiresAuth: true, requiresFish: true }
      },
      {
        path: "citys",
        name: "suppliesBoardCitys",
        component: SuppliesBoardCitys,
        meta: { requiresAuth: true, requiresFish: true }
      },
      {
        path: "areas",
        name: "suppliesBoardAreas",
        component: SuppliesBoardAreas,
        meta: { requiresAuth: true, requiresFish: true }
      },
      {
        path: "towns",
        name: "suppliesBoardTowns",
        component: SuppliesBoardTowns,
        meta: { requiresAuth: true, requiresFish: true }
      },
      {
        path: "nomore",
        name: "suppliesBoardNomore",
        component: SuppliesBoardNomore,
        meta: { requiresAuth: true, requiresFish: true }
      },
      
    ]
  },
  {
    path: "/trade/supplies/post/:id/edit", //供应
    name: "suppliesEditBoard",
    component: SuppliesBoardInfo,
    meta: { requiresAuth: true },
  },
]
